<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018\8\20 0020
 * Time: 17:49
 */
//第一步：删除文件
$file_path = "index.html";
$f = file_exists($file_path) && unlink($file_path);

//第二步：生成自己需要的文件
$file_path = "index.html";
$myfile = fopen($file_path, "w");

//获取文件内容
$file_path = 'index_over.html';
$txt = file_get_contents($file_path);
fwrite($myfile, $txt);
